<template>
	 <el-container>
      <el-aside width="1000px">
		<el-form ref="dialogForm" label-width="100px">
			<el-row>
				<el-form-item label-width="120px" label="方法列表">
					<!-- <el-select placeholder="---请选择请求的方法---" v-model="requestIndex" style="width: 300px" @change="optionChange">
						<el-option v-for="(item, i) in optionsInfo" :key="item.index" :label="`${i + 1}.${item.indexText}`" :value="item.index" />
                    </el-select> -->
                    <el-select placeholder="请选择" v-model="requestIndex" style="width: 550px" @change="optionChange">
                            <el-option-group v-for="(group,x) in optionsInfo" :key="group.label" :label="`${x+ 1}-${group.label}`">
                                <el-option v-for="(item, i) in group.options" :key="item.index" :label="`${x+ 1}-${i + 1}.${item.indexText}`" :value="item.index">
                                    <span style="float: left">{{x+1}}-{{i+1}}.{{item.indexText}}</span>
                                    <span style="float: right; color: #8492a6; font-size: 13px">{{ group.label }}</span>
                                </el-option>
                            </el-option-group>
                        </el-select>
                    <el-icon v-if="hasToken" :size="20">
						<key />
					</el-icon><span v-if="!hasToken" style="color: red">尚未登录,请登录</span><button @click="dialogVisble = true" v-if="hasToken">
						查看token
					</button>
                        <el-tabs v-model="activeName" type="border-card" style="margin-top:10px;width: 850px">
                            <el-tab-pane v-for="(group,x) in optionsInfo" :key="group.label" :label="`${x+ 1}-${group.label}`">
                                <el-radio-group v-model="requestIndex" @change="radioChange">
                                    <el-radio size="mini" border style="width:250px;margin:3px" v-for="(item, i) in group.options" :key="item.index" :label="item.index">{{x+1}}-{{i+1}}.{{item.indexText}}</el-radio>
                                </el-radio-group>
                            </el-tab-pane>
                        </el-tabs>
                </el-form-item>
            </el-row>
            <el-row>
                <el-form-item label-width="120px" label="参数说明">
						<el-input v-model="requestRemark" placeholder="参数说明" style="width: 850px" rows="10" type="textarea" />
					</el-form-item>
            </el-row>
            <el-row>
                <el-form-item label-width="120px" label="请求参数">
						<el-input v-model="requestContent" placeholder="请求参数" style="width: 850px" rows="10" type="textarea" />
                </el-form-item>
            </el-row>
			<el-row>
                <el-form-item label-width="120px" label=""><el-button @click="submit">提交</el-button>
				    <el-button @click="format">格式化请求参数</el-button>
			    </el-form-item>
            </el-row>
			<el-row>
                <el-form-item label-width="120px" label="执行结果">
                    <el-input v-model="requestResult" placeholder="执行结果" style="width: 850px" rows="20" type="textarea" />
			    </el-form-item>
		    </el-row>
		</el-form>
	</el-aside>
	<el-main>
        <json-viewer  :value="responseResult"  :indent="2" :expanded="expanded" :expand-depth="5" boxed copyable></json-viewer>
    </el-main>
    </el-container>
    <el-dialog title="token" v-model="dialogVisble" width="30%" :before-close="close">
        <span>{{ token }}</span>
        <template #footer>
            <span class="dialog-footer">
                <el-button @click="dialogVisble = false">关闭</el-button>
            </span>
        </template>
    </el-dialog>
</template>
<script>
import publicjs from "@/api/model/publicjs";
import config from "@/config";
import http from "@/utils/request";
import JsonViewer from 'vue-json-viewer'
export default {
    name: "waiterService",
    emits: ["success", "closed"],
    components: {
        publicjs,
		JsonViewer
    },
    data() {
        return {
            //表单数据
            dialogVisble: false,
            token: "",
            hasToken: false,
            requestIndex: "appLogin",
            requestRemark: "",
            requestContent: "",
            requestResult: "",
			responseResult:"",
            optionsInfo: [
                 {
                    label: '服务员接口',
                    options: [
                        {
                            index: "appGetStore",
                            indexText: "服务员登录-拉取门店",
                            requestRemark:
                                "username:登录人编码(先默认admin);password:登录密码(先默认123456)",
                            requestContent:
                                '{"username":"admin","password":"123456"}',
                        },
                        {
                            index: "appLogin",
                            indexText: "服务员登录",
                            requestRemark:
                                "orgname:门店编码(先默认0004);username:登录人编码(先默认admin);password:登录密码(先默认123456)",
                            requestContent:
                                '{"orgname":"0004","username":"admin","password":"123456"}',
                        },
                        {
                            index: "appLogoff",
                            indexText: "服务员注销",
                            requestRemark: "取登录后的token",
                            requestContent:
                                '{"functionName":"appLogoff","contentData":""}',
                        },
                        {
                            index: "PwdEdit",
                            indexText: "服务员密码修改",
                            requestRemark: "mobile:手机号,oldPwd:旧密码,newPwd:新密码",
                            requestContent:
                                '{"functionName":"PwdEdit","contentData":{"mobile":"","oldPwd":"","newPwd":""}}',
                        },
                        {
                            index: "getWaiterList",
                            indexText: "获取服务员列表(预定)",
                            requestRemark: `门店取登录的门店编码,返回值为本门店的服务员
                            "userCode":"0003","userName":"aaa"
                            员工编码，员工姓名`,
                            requestContent:
                                '{"functionName":"getWaiterList","contentData":""}',
                        },
                        {
                            index: "GetUserMenu",
                            indexText: "获取用户登录权限",
                            requestRemark: "orgCode:门店编码(先默认0004)",
                            requestContent:
                                '{"functionName":"GetUserMenu","contentData":{"orgCode":"0004"}}',
                        },
                    ]
                },
                 {
                    label: '基础接口',
                    options: [
                        {
                            index: "GetBaseConfigInfo",
                            indexText: "获取基础配置信息",
                            requestRemark: "orgCode:门店编码(先默认0004)",
                            requestContent:
                                '{"functionName":"GetBaseConfigInfo","contentData":{"orgCode":"0004"}}',
                        },


                        {
                            index: "attachment",
                            indexText: "附件上传*",
                            requestRemark: "选择文件上传",
                            requestContent: "",
                        },
                        {
                            index: "getCustomerManageList",
                            indexText: "获取订台人列表(预定)",
                            requestRemark: `门店取登录的门店编码,返回值为本门店的客服经理(订台人)
                            "userCode":"0003","userName":"aaa"
                            员工编码，员工姓名`,
                            requestContent:
                                '{"functionName":"getCustomerManageList","contentData":""}',
                        },
                        {
                            index: "getSexType",
                            indexText: "获取客户性别(预定)",
                            requestRemark: `字典中获取
                            {"code":"011001","name":"男"},{"code":"011002","name":"女"}`,
                            requestContent:
                                '{"functionName":"getSexType","contentData":""}',
                        },
                        {
                            index: "getCustomerSource",
                            indexText: "获取客户来源(预定)",
                            requestRemark: `字典中获取
                            {"code":"104001","name":"自来客"},{"code":"104002","name":"朋友推荐"}...`,
                            requestContent:
                                '{"functionName":"getCustomerSource","contentData":""}',
                        },
                        {
                            index: "getSpecialRequire",
                            indexText: "获取特殊要求(预定)",
                            requestRemark: `字典中获取
                            {"code":"105001","name":"生日聚会"},{"code":"105002","name":"公司聚餐"},{"code":"105003","name":"新人婚礼"}`,
                            requestContent:
                                '{"functionName":"getSpecialRequire","contentData":""}',
                        },
                        {
                            index: "getCancelReason",
                            indexText: "获取取消原因(预定)",
                            requestRemark: `字典中获取
                            {"code":"106001","name":"找不到地方"},{"code":"106002","name":"有事耽误"},{"code":"106003","name":"听说服务差"}`,
                            requestContent:
                                '{"functionName":"getCancelReason","contentData":""}',
                        },
                        {
                            index: "GetOrgStore",
                            indexText: "获取门店数据",
                            requestRemark: ``,
                            requestContent:
                                '{"functionName":"GetOrgStore","contentData":""}',
                        },

                    ]
                },
                {
                    label: '会员接口',
                    options: [
                        {
                            index: "checkMemberInfo",
                            indexText: "检测会员信息",
                            requestRemark: `mobile:手机号\r\n`,
                            requestContent:
                                '{"functionName":"checkMemberInfo","contentData":{"mobile":"186123456"}}',
                        },
                        {
                            index: "getMemberList",
                            indexText: "会员查询(会员)*",
                            requestRemark: `门店取登录的门店编码`,
                            requestContent:
                                '{"functionName":"getMemberList","contentData":{}}',
                        },
                        {
                            index: "memberOpenCrad",
                            indexText: "开卡(会员)*",
                            requestRemark: `门店取登录的门店编码`,
                            requestContent:
                                '{"functionName":"memberOpenCrad","contentData":{}}',
                        },
                        {
                            index: "GetPointRecord",
                            indexText: "会员积分记录",
                            requestRemark: `门店取登录的门店编码`,
                            requestContent:
                                '{"functionName":"GetPointRecord","contentData":{"memberCode":"会员卡号"}}',

                        },
                        {
                            index: "GetMemberConsumeRecord",
                            indexText: "会员消费记录",
                            requestRemark: `门店取登录的门店编码`,
                            requestContent:
                                '{"functionName":"GetMemberConsumeRecord","contentData":{"memberCode":"会员卡号"}}',

                        },
                        {
                            index: "GetMemberChargeRecord",
                            indexText: "会员充值记录",
                            requestRemark: `门店取登录的门店编码`,
                            requestContent:
                                '{"functionName":"GetMemberChargeRecord","contentData":{"memberCode":"会员卡号"}}',

                        },
                        {
                            index: "GetMemberInfoOne",
                            indexText: "会员基础信息",
                            requestRemark: `门店取登录的门店编码`,
                            requestContent:
                                '{"functionName":"GetMemberInfoOne","contentData":{"code":"会员编号"}}',

                        },
                        {
                            index: "GetMemberInfo",
                            indexText: "会员卡信息",
                            requestRemark: `门店取登录的门店编码`,
                            requestContent:
                                '{"functionName":"GetMemberInfoOne","contentData":{"code":"卡号,手机号","encryptData":"扫码信息"}}',

                        },
						{
						    index: "GetUseMemberTicket",
						    indexText: "会员可使用优惠券",
						    requestRemark: `memberCarCode:会员卡号,consumeCode:消费单号,orderDetails:点单列表`,
						    requestContent:
						        '{"functionName":"GetUseMemberTicket","contentData":{"memberCarCode":"00040000045","consumeCode":"0004202405200001","orderDetails":"[{\'goodsCode\':\'P000023\',\'uomCode\':\'041011\',\'goodsName\':\'鸡爪\',\'salePrice\':\'48.00\',\'orderQty\':\'1\'}]"}}',

						},
                        {
                            index: "UpdateMemberLevel",
                            indexText: "会员卡升级",
                            requestRemark: `门店取登录的门店编码,cardNo:卡号`,
                            requestContent:
                                '{"functionName":"UpdateMemberLevel","orgCode": "0004","contentData":{"cardNo":"卡号"}}',
                            responeContent: ``,
                        },
                        {
                            index: "MemberUpPay",
                            indexText: "会员卡升级-支付确认",
                            requestRemark: `门店取登录的门店编码,cardNo:卡号`,
                            requestContent:
                                '{"functionName":"MemberUpPay","orgCode": "0004","contentData":{"payBatchCode":"支付批次号","tee":"金额","payType":"支付类型","tradeNo":"商户号","cardNo":"会员卡号"}}',
                            responeContent: `itemCode:交易流水号`,
                        },
                        {
                            index: "MemberUpPayRet",
                            indexText: "会员卡升级-支付撤销",
                            requestRemark: `门店取登录的门店编码,itemCodes:交易流水号itemCode(多个用,逗号隔开)`,
                            requestContent:
                                '{"functionName":"MemberUpPayRet","orgCode": "0004","contentData":{"itemCodes":"交易流水号itemCode(多个用,逗号隔开)"}}',
                            responeContent: ``,
                        },
                        {
                            index: "MemberRechargeRet",
                            indexText: "会员卡充值-支付撤销",
                            requestRemark: `门店取登录的门店编码,referCode:交易关联号,rechargeCode充值编号,cardNo:卡号`,
                            requestContent:
                                '{"functionName":"MemberRechargeRet","orgCode": "0004","contentData":{"referCode":"交易关联号","rechargeCode":"","cardNo":""}}',
                            responeContent: ``,
                        },
                        {
                            index: "MemberUpPayRecord",
                            indexText: "会员卡升级支付记录",
                            requestRemark: `门店取登录的门店编码,payBatchCode:支付批次号编号,amt:支付金额,payType:支付类型编号,tradeNo:微信支付宝商户单号,cardNo:卡号`,
                            requestContent:
                                '{"functionName":"MemberUpPayRecord","orgCode": "0004","contentData":{"payBatchCode":"支付批次号编号"}}',
                            responeContent: ``,
                        },
                        {
                            index: "CheckMemberInfoByMobile",
                            indexText: "会员是否升级了会员权益卡",
                            requestRemark: `门店取登录的门店编码,mobile:手机号`,
                            requestContent:
                                '{"functionName":"CheckMemberInfoByMobile","orgCode": "0004","contentData":{"mobile":"手机号"}}',
                            responeContent: ``,
                        },
                        {
                            index: "GetMemberInfoByMobile",
                            indexText: "获取会员基础信息",
                            requestRemark: `mobile:手机号`,
                            requestContent:
                                '{"functionName":"GetMemberInfoByMobile","orgCode": "0004","contentData":{"mobile":"手机号"}}',
                            responeContent: ``,
                        },
                    ]
                },
                {
                    label: '房台接口',
                    options: [
                        {
                            index: "getConsumeInfo",
                            indexText: "获取开台信息详情",
                            requestRemark: `门店取登录的门店编码,code:预定编码,roomCode:房台编码,roomName:房台名称,memberCode:会员编码,memberName:会员名称,roomTypeName:桌台类型,memberMobile:会员电话,sex:性别,peopleNumber:到达人数,waiterUserCode:服务员编码,waiterUserName:服务员姓名,maintainUserCode:订台人编码,maintainUserName:订台人姓名,specialRequireTypeCode:特殊要求编码,specialRequireTypeName:特殊要求,remark:备注,state;状态`,
                            requestContent:
                                '{"functionName":"getConsumeInfo","contentData":"0004202402050005"}',
                        },
                        {
                            index: "ConsumeEdit",
                            indexText: "修改开台信息",
                            requestRemark: `门店取登录的门店编码
                            consumeCode:订单号,roomCode:房台编码,memberName:会员姓名,memberMobile:会员电话,minConsume:低消,sex:性别({"code":"011001","name":"男"},{"code":"011002","name":"女"}),arrivedPeoperCount:人数,sourceType:客户来源(code),waiterUser:服务员,maintainUser:订台人(code),specialRequire:特殊要求(code),remark:备注`,
                            requestContent:
                                '{"functionName":"ConsumeEdit","contentData":{"consumeCode":"0004202402050005","roomCode":"0004001","memberName":"123","memberMobile":"13812345678","minConsume":"100","sex":"011002","arrivedPeoperCount":"4","sourceType":"104001","waiterUser":"0003","maintainUser":"0004","specialRequire":"105002","remark":""}}',
                        },
                        {
                            index: "getRoomArea",
                            indexText: "获取门店分区(点单)",
                            requestRemark: `门店取登录的门店编码
                            {"roomAreaCode":"000401","roomAreaName":"bbb"}
                            分区编码，分区名称`,
                            requestContent:
                                '{"functionName":"getRoomArea","contentData":""}',
                        },
                        {
                            index: "getRoomType",
                            indexText: "获取房台类型(点单)",
                            requestRemark: `字典中获取（暂时，后需关联门店获取）
                            {"code":"101001","name":"散台"},{"code":"101002","name":"卡座"},{"code":"101003","name":"吧台"},{"code":"101004","name":"包厢"},{"code":"101005","name":"外摆"}`,
                            requestContent:
                                '{"functionName":"getRoomType","contentData":""}',
                        },
                        {
                            index: "getRoomConsumeState",
                            indexText: "获取房台消费状态(点单)",
                            requestRemark: `从Room对象的ConsumeState的属性取StateList特性
                            {"code":"0","name":"空闲"},{"code":"1","name":"预定"},{"code":"2","name":"使用"},{"code":"3","name":"未支付"}`,
                            requestContent:
                                '{"functionName":"getRoomConsumeState","contentData":""}',
                        },
                        {
                            index: "getRoomInfo",
                            indexText: "获取房台信息(点单)",
                            requestRemark: `门店取登录的门店编码
                            {"roomCode":"房台编码","roomName":"房台名称","typeCode":"房台类型","typeName":"房台类型名称","roomAreaCode":"房台区域","waiterUserCode":服务员编码,"waiterUserName":服务员,"maintainUserCode":订台人编码,"maintainUserName":订台人,"minConsume":低消,consumeMinConsume:"开台低消","reserveMinConsume":"预定低消","maxPeople":容纳人数,"reservePeople":预定人数,"consumeCode":订单编码,"currentConsume":当前消费金额,"currentCharge":当前充值,"currentPeople":当前人数,"currentGive":当前赠送,"openTime":开台时间,"reserveTime":预定时间,"arriveTime":到达时间,"keepTime":保留时长,reserveSourceType:预定来源类型,reserveSourceTypeName:预定来源类型,consumeSourceType:开台来源类型,consumeSourceTypeName:开台来源类型,"sourceUser":介绍人,"ReserveCode":预定编码,"reserveMemberCode":预定的会员编码,"reserveMemberName":预定的会员姓名,"reserveMemberMobile":预定的会员电话,"ReserveSex":预定的会员性别,"consumeMemberCode":消费的会员编码,"consumeMemberName":消费的会员姓名,"consumeMemberMobile":消费的会员电话,"consumeState":"消费状态","ConsumeStateName":消费状态名称,"reserveRemark":预定备注,"consumeRemark":消费备注}
                            `,
                            requestContent:
                                '{"functionName":"getRoomInfo","contentData":""}',
                        },

                        {
                            index: "getWaiterRoom",
                            indexText: "服务员绑定(点单)",
                            requestRemark: `门店取登录的门店编码,获取服务员绑定的房台列表:简单字符串,先删除再增加
                                {"functionName":"getWaiterRoom","contentData":"0004001,0004002"}
                                `,
                            requestContent:
                                '{"functionName":"getWaiterRoom","contentData":""}',
                        },

                        {
                            index: "roomClear",
                            indexText: "清除房台(点单)",
                            requestRemark: `门店取登录的门店编码,contentData:房台列表,暂时没有判断是否可清除`,
                            requestContent:
                                '{"functionName":"roomClear","contentData":"0004003,0004005"}',
                        },
                        {
                            index: "roomRepair",
                            indexText: "房台报修(点单)",
                            requestRemark: `门店取登录的门店编码 roomList房台编号 state 1 正常 0 维修`,
                            requestContent:
                                '{"functionName":"roomRepair","contentData":{"roomList":"","state":""}}',
                        },
                        {
                            index: "roomOpen",
                            indexText: "开台(点单)",
                            requestRemark: `门店取登录的门店编码,roomCode:房台编码(*),reserveCode:预定编码,callCode:排队编码,memberCode:会员编码(为空需要判断是否存在),memberName:会员姓名,memberMobile:会员电话,memberOpenid:openid,sex:性别{"code":"011001","name":"男"},{"code":"011002","name":"女"},sourceType:来源{"code":"104001","name":"自来客"},{"code":"104002","name":"朋友推荐"},{"code":"104003","name":"抖音"},{"code":"104004","name":"营销活动"},openTime:开台时间,waiterUser:开台人,maintainUser:订台人,arrivedPeoperCount:达到人数,MinConsume:低消,specialRequire:特殊要求,remark:"备注"`,
                            requestContent:
                                '{"functionName":"roomOpen","contentData":{"roomCode":"0004003","reserveCode":"","callCode":"","memberCode":"","memberName":"李四","memberMobile":"13456456456","memberOpenid":"","sex":"011002","sourceType":"104004","openTime":"2024-01-31 16:00:00","waiterUser":"0003","maintainUser":"0004","arrivedPeoperCount":"3","sourceType":"104003","minConsume":"1000","specialRequire":"105002","remark":"备注"}}',
                        },
                        {
                            index: "RoomChange",
                            indexText: "转台(点单)",
                            requestRemark: `门店取登录的门店编码,oldRoomCode:旧房台编码(*),newRoomCode:新房台编码(空闲状态的),consumeCode:旧房台的当前消费订单,peopleCount:人数`,
                            requestContent:
                                '{"functionName":"RoomChange","contentData":{"oldRoomCode":"0004002","newRoomCode":"0004006","consumeCode":"0004202402260003","peopleCount":"8"}}',
                        },

                        {
                            index: "RoomRest",
                            indexText: "复台操作",
                            requestRemark: `门店取登录的门店编码,roomCode:房台号`,
                            requestContent:
                                '{"functionName":"RoomRest","contentData":{"roomCode":"0004013"}}',
                        },

                        {
                            index: "roomChange",
                            indexText: "转台(点单)",
                            requestRemark: `门店取登录的门店编码`,
                            requestContent:
                                '{"functionName":"roomChange","contentData":{}}',
                        },
                        {
                            index: "roomMerge",
                            indexText: "并台(点单)",
                            requestRemark: `门店取登录的门店编码 oldRoomCode:原房台号,newRoomCode:目标房台号,oldConsumeCode:原房台订单号,newConsumeCode:目标房台订单号,peopleCount:并台人数,isMergeConsume:是否并账 0 否 1是`,
                            requestContent:
                                '{"functionName":"RoomMerge","contentData":{"oldRoomCode":"0003010","newRoomCode":"0004004","oldConsumeCode":"0004202402260003","newConsumeCode":"0004202402270003","peopleCount":"1","isMergeConsume":"1"}}',
                        },
                        {
                            index: "editBaseInfo",
                            indexText: "修改基础信息(点单)*",
                            requestRemark: `门店取登录的门店编码`,
                            requestContent:
                                '{"functionName":"editBaseInfo","contentData":{}}',
                        },
                        
                        {
                            index: "GetRoomOpeHistory",
                            indexText: "获取房台操作记录",
                            requestRemark: `stratDate:开始时间\r\n endDate:结束时间 \r\nroomCode:房台号 \r\n
                            code:记录编号 \r\narrivedPeoperCount:人数 \r\nmaintainUserName:订台人 \r\nwaiterUserName:服务员 \r\nminConsume:低消 \r\n
                            realAmt:实消 \r\ncrDate:操作时间 \r\nmemberMobile:手机号 stateName:操作类型 \r\n consumeCode:订单号,pageSize:当页条数,pageIndex:页码`,
                            requestContent:
                                '{"functionName":"GetRoomOpeHistory","contentData":{"stratDate":"2024-01-10 00:00:00","endDate":"2024-02-17 00:00:00","roomCode":"0004003","pageSize":10,"pageIndex":1}}',
                        },

                        {
                            index: "GetRoomOpeHistoryDetail",
                            indexText: "获取房台操作详情",
                            requestRemark: `门店取登录的门店编码,roomCode:房台号,consumeCode:消费单号,stratDate:开始时间(有传订单号传空值),endDate:结束时间(有传订单号传空值),pageSize:当页条数,pageIndex:页码
                            code,coonsumeCode:订单编号,maintainUserName:订台人,startTime:开台时间,roomCode:房台号,totalAmt:总金额,difAmt:差额,apyAmt:支付金额,ticketAmt:优惠券金额,giveAmt:店铺赠送金额;remark:开台备注,orderGoodCount:当前订单商品数量
                            orderGoods:[{orderBatchCode:批次号,orderTime:点单时间,totalAmt:总金额,orderUser:点单人,orderUserName:点单人,orderGoodsInfos(订单商品信息):[{itemCode:商品编号,orderBatchCode:订单批次号,consumeCode:订单编号,goodsPriceCode:套餐编号,
                                goodsPriceInfos:[{itemCode:订单商品编号,goodsCode:商品编号,goodsName:商品名称,uomName:单位,realQty:实际熟练,orderQty:订单数量,totalAmt:总金额,realAmt:实际支付金额,payAmt:支付金额}],
                                standard:规格,goodsCode:商品编号,goodsName:商品名称,uomName:单位,realQty:实际数量,orderQty:订单数量,totalAmt:总金额,realAmt:实际支付金额,payAmt:支付金额,orderTime:订单时间,orderUser:订单人,orderUserName:订单人名称}]
                            orderPayInfos:[{consumeCode:订单编号,itemCode:支付编号,payBatchCode:支付批次号,payDate:支付时间,payAmt:支付金额,realAmt:实际支付金额,payTypeName:支付方式}]`,
                            requestContent:
                                '{"functionName":"GetRoomOpeHistoryDetail","contentData":{"roomCode":"0004002","consumeCode":"","stratDate":"2024-01-10 00:00:00","endDate":"2024-03-17 00:00:00","pageSize":15,"pageIndex":1}}',
                        },
                        {
                            index: "GetRoomOpeHistoryDetailNew",
                            indexText: "获取房台操作详情(新)",
                            requestRemark: `门店取登录的门店编码,roomCode:房台号,consumeCode:消费单号,stratDate:开始时间(有传订单号传空值),endDate:结束时间(有传订单号传空值),pageSize:当页条数,pageIndex:页码
                            {consumeCode:台单号,goodsCount:商品总数,totalAmt:商品总额,payAmt:已支付金额,unPayAmt:未支付金额,penddingAmt:支付中金额,unPayGoods:[未支付商品],payGoods:已支付商品[{orderTime:点单时间,payBatchCode:买单批次号,orderUser:买单人,payGoodsdtl:[{standard:规格,goodsName:商品名称,goodsCode:商品编号,realQty:数量,isShow:false,totalAmt:商品金额,goodsPriceInfos:[]}]}],payPendingGoods:支付中商品[{orderTime:2024/5/17 16:59:46,payBatchCode:0004202405170020103738,orderUser:admin,payGoodsdtl:[{standard:规格3,goodsName:鸡爪,goodsCode:P000023,realQty:1,isShow:false,totalAmt:48.00,goodsPriceInfos:[]}]}],payList:[{payBatchCode:买单批次号,payDate:买单时间,payAmt:支付金额,payTypeName:支付方式,itemCode:买单交易流水号}],disAmt:折扣金额,smallChange:抹零金额,addMinConsume:补低消金额,serviceAmt:服务费}`,
                            requestContent:
                                '{"functionName":"GetRoomOpeHistoryDetailNew","contentData":{"roomCode":"0004002","consumeCode":"","stratDate":"2024-01-10 00:00:00","endDate":"2024-03-17 00:00:00","pageSize":15,"pageIndex":1}}',
                        },
                        {
                            index: "GetRoomInfoNew",
                            indexText: "获取桌台信息列表",
                            requestRemark: ``,
                            requestContent:
                                '{"functionName":"GetRoomInfoNew","contentData":""}',
                        },
                        {
                            index: "GetRoomInfoNewV2",
                            indexText: "获取点单房台列表V2.0",
                            requestRemark: "orgCode:机构编号\r\nreserveTime:预订时间(当前日期),roomState 0 空闲 1 预定 2 使用中 3 未支付 -1 维修 -2 锁定,typeCode:房台类型 {totalCount:总数,noCount:空闲,useCount:使用中,reserveCount:预定,repairCount:维修,lockCount:锁定,areaRooms:[{roomCode:桌台编号,roomName:桌台名称,typeCode:类型编号,typeName:类型名称,minConsume:低消,consumeCode:消费编号,reserveCode:预定编号,maxPeople:最大人数,roomState:状态编码,roomStateDesc:状态名称,arrivedPeopleCount:到达人数,startTime:开台时间,mainTainUserName:订台人,memberName:客户,remark:备注,unPayAmt:未支付金额,disAmt:优惠金额}]",
                            requestContent:
                                '{"functionName": "GetRoomInfoNewV2","orgCode": "0004","contentData": {"reserveTime":"2024-03-21 10:00:00","roomState":"","typeCode":"","pageSize":15,"pageIndex":1}}',
                            responeContent: "{totalCount:总数,noCount:空闲,useCount:使用中,reserveCount:预定,repairCount:维修,lockCount:锁定,areaRooms:[{roomCode:桌台编号,roomName:桌台名称,typeCode:类型编号,typeName:类型名称,minConsume:低消,consumeCode:消费编号,reserveCode:预定编号,maxPeople:最大人数,roomState:状态编码,roomStateDesc:状态名称,arrivedPeopleCount:到达人数,startTime:开台时间,mainTainUserName:订台人,memberName:客户,remark:备注,unPayAmt:未支付金额,disAmt:优惠金额}]",
                        },
                    ]
                },
                {
                    label: '商品接口',
                    options: [

                        {
                            index: "getGoodsTypeOrg",
                            indexText: "获取商品分类(点单)",
                            requestRemark:
                                "门店取登录的门店编码，此商品分类是门店自定义的分类，目前只支持一级",
                            requestContent:
                                '{"functionName":"getGoodsTypeOrg","contentData":""}',
                        },
                        {
                            index: "getGoodsInfo",
                            indexText: "获取商品信息(点单)",
                            requestRemark: `门店取登录的门店编码
                            单品或制作类{"goodsType":"门店商品分类","goodsCode":"商品编码","goodsName":"商品名称","groupTypeCode":"分组编码(046002:成品类或单品,046002:制作类或单品,046002:套餐)","groupTypeName":"分组名称","saleQty":"已销售数量","attachment":"图片.暂没使用","mainAttachment":"主图片.暂没使用","salePrice":"售价","suggestPrice":"建议售价","type":"0:单品只有一个价格,1:单品单位不同有多个价格,2:套餐","priceList":[{"itemCode":"每条记录的编码由商品编码+门店+单位组成","orgCode":"门店编码","goodsCode":"商品编码","goodsName":"商品名称","uomCode":"单位","uomName":"单位","salePrice":"售价","producePoint":"出品点","goodsFlavor":"口味","isEstmClear":"沽清状态(0:售卖,1沽清)","state":"0 下架 1 上架 ","mainAttachment":"图片"}]}
                            套餐{}
                            `,
                            requestContent:
                                '{"functionName":"getGoodsInfo","contentData":""}',
                        },
                        {
                            index: "GetGoodsList",
                            indexText: "获取商品管理列表",
                            requestRemark: `门店取登录的门店编码,goodsName:商品名字(可为空,传值模糊查询)
                            ,{ItemCode:编号,GoodsCode:商品编号,goodsName:商品名称,GroupType:商品大类,type: 0单品 1 套餐,typeName:商品类别,goodsType:左侧菜单分类,UomCode:单位编号,UomName:单位名称,SalePrice:销售价,SuggestPrice:建议销售价,ProducePoint:310002,GoodsFlavor:规格,IsEstmClear:是否沽清 0 否 1是,Attachment:图片路劲,MainAttachment:主图片路劲,State:上下架状态 1 上架 0下架}`,
                            requestContent:
                                '{"functionName":"GetGoodsList","contentData":{"goodsName":""}}',
                        },
                        {
                            index: "GoodsUpDownShelves",
                            indexText: "商品上下架",
                            requestRemark: `门店取登录的门店编码{"goodsCode":"商品编码","uomCode":"单位编码","state":"1 上架 0 下架"}`,
                            requestContent:
                                '{"functionName":"GoodsUpDownShelves","contentData":{"goodsCode":"商品编码","uomCode":"单位编码","state":"1"}}',
                        },
                        {
                            index: "GoodsGuQing",
                            indexText: "商品沽清/反沽清",
                            requestRemark: `门店取登录的门店编码{"goodsCode":"商品编码","uomCode":"单位编码","state":"1 沽清 0 反沽清"}`,
                            requestContent:
                                '{"functionName":"GoodsGuQing","contentData":{"goodsCode":"商品编码","uomCode":"单位编码","state":"1"}}',
                        },
                    ]
                },
                {
                    label: '订单接口',
                    options: [
                        {
                            index: "orderAdd",
                            indexText: "点单(点单)",
                            requestRemark: `门店取登录的门店编码,consumeCode:消费单号,payType:1 先下单 2 先结账,orderBatchCode:点单批次号(房台信息中获取,如果不存在支付中的数据进行点单需要传),roomCode:房台编码,remark:备注,operType:签送赋值2,其他为空,detail:点单详情,itemCode:主键(新增时候为空),doType:操作类型(Add:新增Edit修改Delte删除),itemType:记录说明(1单品2套餐3套餐详情),goodsPriceCode:套餐编码(单品为空),goodsCode:商品编码,goodsName:商品名称,uomCode:单位编码,uomName:单位名称,flavor:口味,salePrice:售价,vipPrice:会员价,orderQty:点单数量,producePoint:出品点`,
                            requestContent:
                                '{"functionName":"orderAdd","contentData":{"consumeCode":"0004202402050006","orderBatchCode":"","payType":"1","roomCode":"0004003","remark":"速上","operType":"2","detail":[{"itemCode":"","doType":"add","indexStr":"1","itemType":"1","goodsPriceCode":"","goodsCode":"p000001","goodsName":"百威","uomCode":"041010","uomName":"支","flavor":"加冰","salePrice":"30","vipPrice":"29","orderQty":"2","producePoint":"000403"},{"itemCode":"","doType":"add","indexStr":"2","itemType":"2","goodsPriceCode":"p013087","goodsCode":"p013087","goodsName":"醇黑套餐","uomCode":"041006","uomName":"套","flavor":"","salePrice":"470.00","orderQty":"1","producePoint":"000403"},{"itemCode":"","doType":"add","indexStr":"3","itemType":"3","goodsPriceCode":"p013087","goodsCode":"p013086","goodsName":"醇黑","uomCode":"041010","uomName":"支","flavor":"加冰","salePrice":"400","orderQty":"1","producePoint":"000403"},{"itemCode":"","doType":"add","indexStr":"4","itemType":"3","goodsPriceCode":"p013087","goodsCode":"p000009","goodsName":"可乐","uomCode":"041010","uomName":"支","flavor":"加冰","salePrice":"10","orderQty":"6","producePoint":"000403"},{"itemCode":"","doType":"add","indexStr":"5","itemType":"3","goodsPriceCode":"p013087","goodsCode":"p000007","goodsName":"纸巾","uomCode":"041008","uomName":"包","flavor":"","salePrice":"5","orderQty":"2","producePoint":"000403"}]}}',
                        },
                        {
                            index: "getOrderDetail",
                            indexText: "获取点单商品",
                            requestRemark: `门店取登录的门店编码,consumeCode:消费单号,OperType:点单记录类型(0:删除完全不要了,1:正常需要买单,2:签送商品,3:取酒,4:换入,5:换出,6:兑换)其中1和4需要买单,ProcessState:行记录类型0:删除(等同OperType=0),1:已下单,2:已支付(针对OperType=1和4,其他自动认为已支付),3:已退款(等同已下单未买单)`,
                            requestContent:
                                '{"functionName":"getOrderDetail","contentData":{"consumeCode":"0004202402050006","operType":"1,4","processState":""}}',
                        },
                        {
                            index: "getOrderList",
                            indexText: "获取订单列表*",
                            requestRemark: `门店取登录的门店编码`,
                            requestContent:
                                '{"functionName":"getOrderList","contentData":{}}',
                        },
                        {
                            index: "OrderPay",
                            indexText: "买单确认",
                            requestRemark: `门店取登录的门店编码,consumeCode:消费单号,tradeNo:商户交易单号(微信或者支付宝支付完后返回的tradeNo),roomCode:房台编码,payUser:付款人(代付),payBatchCode:批次号(首次买单为空,后续再买单将首次的批次号传入),detailList:付款商品列表(使用点单的itemCode),orderAmt:点单商品金额,realPayAmt:实际收款金额,payList:支付列表(手机端只有一条,电脑端可能有多条),totalAmt:本次需要的付款金额,payAmt:客人付款金额(现金可能大于点单金额,需要有找零和抹零,其他方式totalAmt==payAmt),giveChange:找零金额,smallChange:抹零金额,cardNo:会员卡号(会员付款),memberName:会员姓名,memberMobile:电话,memberOpenId:openid,payType:支付方式(001现金 002微信 003支付宝 004会员卡 005消费卷 006银联 007其他 008挂账 009聚合支付 010团购券 011赠送 012会员优惠券),mountUser:挂账人名称(挂账支付需要传),mountMobile挂账人手机号(挂账支付需要传),mountSex挂账人性别(字典数据编号011)(挂账支付需要传),suretyUser:担保人编号,服务员数据(挂账支付需要传),giftUser:赠送人服务员数据(赠送支付需要传),giftRemark:赠送备注(赠送支付需要传),notGiveChange:找赎金额(现金支付需要传)`,
                            requestContent:
                                '{"functionName":"OrderPay","orgCode": "0004","contentData":{"serviceAmt":[{"code":"买单批次号","type":"抹零/服务费/折扣优惠/补低消/会员折扣优惠","subType":"子类型","amt":"金额"}],"consumeCode":"0004202402050006","roomCode":"0004003","payUser":"","payBatchCode":"","tradeNo":"商户单号","MemberTicketCode":"使用会员券编码","detailList":"0004202402050006001,0004202402050006002","orderAmt":"495.5","realPayAmt":"495","payType":"001","payList":[{"totalAmt":"495.5","payAmt":"500","giveChange":"5","smallChange":"0.5","cardNo":"","memberName":"","memberMobile":"","memberOpenId":"","payType":"001","mountUser":"","mountMobile":"","mountSex":"","suretyUser":"","giftUser":"","giftRemark":"","notGiveChange":""}]}}',
                            responeContent: `{payBatchCode:买单批次号,itemCode:每次支付的交易流水号}`,
                        },
                        {
                            index: "Checkout",
                            indexText: "结账",
                            requestRemark: `门店取登录的门店编码
                            payBatchCode:买单批次号,itemCodeList:商品编号ItemCode(多个用,逗号隔开)`,
                            requestContent:
                                '{"functionName":"Checkout","contentData":{"payBatchCode":"买单批次号","itemCodeList":"商品编号ItemCode(多个用,逗号隔开)"}}',
                        },
                        {
                            index: "OrderPayRet",
                            indexText: "结账-支付撤销",
                            requestRemark: `门店取登录的门店编码
                            payType:方式编号 支付方式(001现金 002微信 003支付宝 004会员卡 005消费卷 006银联 007其他 008挂账 009聚合支付 010团购券 011赠送 012 会员优惠券撤销) ,itemCode:支付交易流水号(每次买单返回的itemCode),amt:支付的金额,payBatchCode:买单批次号(每次买单返回的payBatchCode),consumeCode:台单号(每个使用中的桌台都会带有),cardNo:会员卡号(撤销会员支付需要传卡号),tradeNo:微信支付宝支付的商户订单号(微信支付宝支付返回的商户订单号),`,
                            requestContent:
                                '{"functionName":"OrderPayRet","contentData":{"payType":"001","itemCode":"支付交易流水号","amt":"支付金额","payBatchCode":"买单批次号","consumeCode":"台单号","cardNo":"会员卡号","tradeNo":"微信和支付宝支付返回的tradeNo"}}',
                        },
                        {
                            index: "getOrderPay",
                            indexText: "获取买单记录",
                            requestRemark: `门店取登录的门店编码,consumeCode:消费单号,payBatchCode:买单批次号`,
                            requestContent:
                                '{"functionName":"getOrderPay","contentData":{"consumeCode":"0004202402050006","payBatchCode":"0004202402050006105557"}}',
                        },
                        {
                            index: "orderChange",
                            indexText: "换菜(点单)*",
                            requestRemark: `门店取登录的门店编码`,
                            requestContent:
                                '{"functionName":"orderChange","contentData":{}}',
                        },
                        {
                            index: "orderRemover",
                            indexText: "退单(点单)*",
                            requestRemark: `门店取登录的门店编码`,
                            requestContent:
                                '{"functionName":"orderRemover","contentData":{}}',
                        },
                        {
                            index: "orderUrge",
                            indexText: "催菜(点单)*",
                            requestRemark: `门店取登录的门店编码`,
                            requestContent:
                                '{"functionName":"orderUrge","contentData":{}}',
                        },
                        {
                            index: "GetOrderTotleAmt",
                            indexText: "获取未支付订单金额",
                            requestRemark: `roomCode:房台号 totleAmt:订单金额`,
                            requestContent:
                                '{"functionName":"GetOrderTotleAmt","contentData":{"roomCode":"0004003"}}',
                        },
                        {
                            index: "getOrderPayNew",
                            indexText: "获取买单记录(新)",
                            requestRemark: `门店取登录的门店编码,roomCode:房台号,consumeCode:消费单号,payBatchCode:买单批次号`,
                            requestContent:
                                '{"functionName":"getOrderPayNew","contentData":{"roomCode":"0004013","consumeCode":"0004202402050006","payBatchCode":"0004202402050006105557"}}',
                        },
                        {
                            index: "OrderSearch",
                            indexText: "订单查询",
                            requestRemark: `门店取登录的门店编码,startDate:开始时间,endDate:结束时间,key:订单号或者桌号,state:3已退款,pageSize:当页大小,pageIndex:页码
                            ,roomCode:房台号,roomName:房台名字,payUserName:订单人,orderBatchCode:订单批次号,consumeCode:订单号,state:状态,orderTime:订单时间,payTime:支付时间,totalAmt:总金额`,
                            requestContent:
                                '{"functionName":"OrderSearch","contentData":{"startDate":"2023-01-01 00:00:00","endDate":"2025-01-01 00:00:00","key":"","state":"","pageSize":10,"pageIndex":1}}',
                        },
                        {
                            index: "GetConsumeOrderDetail",
                            indexText: "订单详情",
                            requestRemark: `门店取登录的门店编码,orderBatchCode:订单批次号
                            ,{operType:2(签送)1(正常点单),roomCode:桌台号,roomName:桌台名称,orderBatchCode:订单批次号,consumeCode:订单号,memberName:人数,state:支付状态,payName:支付方式,payBatchCode:支付批次号
                                ,orderTime:下单时间,payTime:支付时间,totalAmt:总金额,realAmt:实际支付金额,needPay:是否需要支付,payCoins:抵扣金币,remark:备注
                                ,orderGoodsInfos:[{itemCode:编号,orderBatchCode:订单批次好,consumeCode:订单号,goodsPriceCode:商品编号,goodsCode:商品编号,goodsName:商品名称,uomName:单位,realQty:数量,orderQty:订单数量,standard:规格,totalAmt:总金额,realAmt:实际支付金额,payAmt:支付金额,orderTime:订单时间,orderUser:订单人,orderUserName:订单人,IsShow:是否显示,goodsPriceInfos:[{itemCode:编号,goodsCode:商品编号,goodsName:商品名称,uomName:单位,realQty:数量,orderQty:订单数量,totalAmt:金额,realAmt:实际支付金额,payAmt:支付金额,standard:规格}]}]}`,
                            requestContent:
                                '{"functionName":"GetConsumeOrderDetail","contentData":{"orderBatchCode":"0004202402270001153445"}}',
                        },

                        {
                            index: "OrderCancel",
                            indexText: "取消订单",
                            requestRemark: `orderBatchCode:点单批次号`,
                            requestContent:
                                '{"functionName":"OrderCancel","contentData":{"orderBatchCode":"0004202402050005200908"}}',
                        },
                        {
                            index: "OrderCancelV2",
                            indexText: "取消订单v2.0",
                            requestRemark: `payBatchCode:买单批次号 itemCodeList:所选择的商品ItemCode(多个用,逗号隔开)`,
                            requestContent:
                                '{"functionName":"OrderCancelV2","contentData":{"payBatchCode":"0004202402050005200908","itemCodeList":""}}',
                        },

                        {
                            index: "GetSignGoodsList",
                            indexText: "获取签送商品列表",
                            requestRemark: `userCode:服务员编码\r\ngoodsName:商品名称`,
                            requestContent:
                                '{"functionName":"getSignGoodsList","contentData":{"userCode":"admin","goodsName":""}}',
                        },
                        {
                            index: "GetSignRecordList",
                            indexText: "获取签送记录列表",
                            requestRemark: `userCode:服务员编码`,
                            requestContent:
                                '{"functionName":"getSignRecordList","contentData":{"userCode":"admin"}}',
                        },
                        {
                            index: "GetOrderDetails",
                            indexText: "获取已点订单",
                            requestRemark: `门店取登录的门店编码,orderBatchCode:订单批次号,pageIndex:页码,pageSize:每页数量
                            totalAmt:合计金额,totalCount:商品数量,itemCode:订单商品编号,goodsCode:商品编号,goodsName:商品名称,uomName:商品单位,orderQty:数量,salePrice:单价,flavor:口味,goodsInfoDetail[套餐明细]`,
                            requestContent:
                                '{"functionName":"GetOrderDetails","contentData":{"orderBatchCode":"0004202401300012100351","pageIndex":"1","pageSize":"15"}}',
                        },
                        {
                            index: "OrderPayClose",
                            indexText: "结账-未点击结账直接关闭撤销所有订单和支付记录",
                            requestRemark: `goodsItemCode:选中商品itemCode(多个用,逗号隔开) ,payBatchCode:买单批次号,consumeCode:消费单号(台单号)`,
                            requestContent:
                                '{"functionName":"OrderPayClose","contentData":{"goodsItemCode":"选中商品itemCode(多个用,逗号隔开)","payBatchCode":"买单批次号","consumeCode":"消费单号"}}',
                        },
                    ]
                },
                {
                    label: '预订接口',
                    options: [
                        {
                            index: "getReserveList",
                            indexText: "获取预定信息列表(预定)",
                            requestRemark: `门店取登录的门店编码,key:姓名或电话或订台人或者桌台号,state:0取消1预定2到达入座,name:订台人,currentDate_Start:预定开始时间,currentDate_End:预定结束时间,count:当前预定订台数量,pageSize:页面大小,pageIndex:页面索引`,
                            requestContent:
                                '{"functionName":"getReserveList","contentData":{"key":"","state":"",name:"","currentDate_Start":"2024-03-01 00:00:00","currentDate_End":"2024-03-01 23:00:00","pageSize":"20","pageIndex":"1"}}',
                        },
                        {
                            index: "getReserveInfo",
                            indexText: "获取预定信息详情(预定)",
                            requestRemark: `门店取登录的门店编码,code:预定编码,roomCode:房台编码,roomName:房台名称,memberCode:会员编码,memberName:会员名称,roomTypeName:桌台类型,memberMobile:会员电话,sex:性别,peopleNumber:预定人数,reserveTime:预定时间,keepFullTime:保留时间,waiterUserCode:服务员编码,waiterUserName:服务员姓名,maintainUserCode:订台人编码,maintainUserName:订台人姓名,specialRequireTypeCode:特殊要求编码,specialRequireTypeName:特殊要求,remark:备注,state;状态`,
                            requestContent:
                                '{"functionName":"getReserveInfo","contentData":"0004202401300012"}',
                        },
                        {
                            index: "reserveAdd",
                            indexText: "预定房间或修改预定(预定)",
                            requestRemark: `门店取登录的门店编码
                            reserveCode:预定编码(空字符串是新增,否则为修改),roomCode:房台编码,memberName:会员姓名,memberMobile:会员电话,minConsume:低消,sex:性别({"code":"011001","name":"男"},{"code":"011002","name":"女"}),peopleNumber:人数,reserveTime:计划到达时间,sourceType:客户来源(code),waiterUser:服务员,maintainUser:订台人(code),specialRequireType:特殊要求(code),remark:备注`,
                            requestContent:
                                '{"functionName":"reserveAdd","contentData":{"reserveCode":"","roomCode":"0004001","memberName":"123","memberMobile":"13812345678","minConsume":"100","sex":"011002","peopleNumber":"4","reserveTime":"2024-01-23 18:30:00","sourceType":"104001","waiterUser":"0003","maintainUser":"0004","specialRequireType":"105002","remark":""}}',
                        },
                        {
                            index: "reserveCancel",
                            indexText: "取消预定(预定)",
                            requestRemark: `门店取登录的门店编码
                            roomCode:房台编码,reserveCode:预定编码,cancelReason:取消原因,remark:备注`,
                            requestContent:
                                '{"functionName":"reserveCancel","contentData":{"roomCode":"0004001","reserveCode":"0004202401230010","cancelReason":"106002","remark":"下次再来"}}',
                        },
                        {
                            index: "GetReserveCount",
                            indexText: "获取当日预定订台数",
                            requestRemark: `reserveTime_Start:开始时间,reserveTime_End:结束时间`,
                            requestContent:
                                '{"functionName":"GetReserveCount","contentData":{"reserveTime_Start":"2024-02-04 00:00:00","reserveTime_End":"2024-02-04 23:00:00"}}',
                        },
                    ]
                },
                 {
                    label: '存取酒接口',
                    options: [
                        {
                            index: "wineStore",
                            indexText: "存酒操作",
                            requestRemark: `nmobile:手机号\r\nroomCode:房间号\r\nstorePosition:寄存位置(1:吧台 2:仓库)\r\nuserName:服务员\r\nimages:酒水图片\r\nremark:备注\r\ngoods:酒水数据`,
                            requestContent:
                                '{"functionName":"wineStore","contentData":{"mobile":"18605015820","roomCode":"0004008","storePosition":1,"userName":"admin","images":"","remark":"","goods":""}}',
                        },
                        {
                            index: "getWineStoreList",
                            indexText: "获取存酒列表",
                            requestRemark: `mobile:手机号\r\npageIndex:当前页数\r\npageSize:每页数量`,
                            requestContent:
                                '{"functionName":"getWineStoreList","contentData":{"mobile":"18605015820"}}',
                        },
                        {
                            index: "wineTake",
                            indexText: "取酒操作",
                            requestRemark: `mobile:手机号\r\nroomCode:房间号\r\nwinStoreCode:存酒列表Code\r\ntakeQty:取酒数量`,
                            requestContent:
                                '{"functionName":"wineTake","contentData":{"mobile":"18605015820","roomCode":"0004008","winStoreCode":"0004202402190002","takeQty":"0.8"}}',
                        },
                        {
                            index: "WineDelay",
                            indexText: "酒水延期",
                            requestRemark: `mobile:手机号\r\nwinStoreCode:存酒列表Code\r\ndelayDay:延期天数`,
                            requestContent:
                                '{"functionName":"wineDelay","contentData":{"mobile":"18605015820","winStoreCode":"0004202402190002","delayDay":3}}',
                        },
                        {
                            index: "UpdateWineStoreInfo",
                            indexText: "修改存酒信息",
                            requestRemark: `itemCode:存取单号\r\nmobile:手机号\r\nroomCode:房间号\r\nstorePosition:寄存位置(1:吧台 2:仓库)\r\nuserName:服务员\r\nimages:酒水图片\r\nremark:备注\r\ngoods:酒水数据`,
                            requestContent:
                                '{"functionName":"UpdateWineStoreInfo","contentData":{"itemCode":"存取单号","mobile":"18605015820","roomCode":"0004008","storePosition":1,"userName":"admin","images":"","remark":"","goods":""}}',
                        },
                        {
                            index: "getRoomConsumeList",
                            indexText: "获取房台消费列表",
                            requestRemark: `roomCode:房间号\r\n`,
                            requestContent:
                                '{"functionName":"getRoomConsumeList","orgCode":"0015","contentData":{"roomCode":"0004008"}}',
                        },
                        {
                            index: "getDepotList",
                            indexText: "获取仓库列表",
                            requestRemark: ``,
                            requestContent:
                                '{"functionName":"getDepotList","contentData":{}}',
                        },
                        {
                            index: "getWineListByName",
                            indexText: "根据名称模糊搜索酒水",
                            requestRemark: `name:酒水名称\r\npageIndex:当前页数\r\npageSize:每页数量`,
                            requestContent:
                                '{"functionName":"getWineListByName","contentData":{"name":"百威","pageIndex":1,"pageSize":15}}',
                        },
                        {
                            index: "WineRecovery",
                            indexText: "酒水回收",
                            requestRemark: `roomCode:房间号\r\ndepotCode:仓库编码\r\ndepotName:仓库名称\r\ntakeUserCode:回收人编码\r\ntakeUserName:回收人名称\r\nremark:备注\r\nuserName:操作员名称\r\ngoods:商品列表[{"goodsCode":"p000001","goodsName":"百威","uomCode":"041010","uomName":"支","recoveryQty":4}]`,
                            requestContent:
                                '{"functionName":"WineRecovery","contentData":{"roomCode":"0004003","depotCode":"0004202402190001","depotName":"仓库A","takeUserCode":"admin","takeUserName":"张三","userName":"admin""remark":"送你了","goods":"[]"}}',
                        },

                        {
                            index: "GetWineStoreTakeStat",
                            indexText: "获取存取酒订单汇总(存取管理)",
                            requestRemark: ``,
                            requestContent:
                                '{"functionName":"getWineStoreTakeStat","contentData":{}}',
                        },
                        {
                            index: "GetWineStoreTakeList",
                            indexText: "获取存取酒列表(存取管理)",
                            requestRemark: `keyWord:关键词(会员名，手机号)\r\nstate:状态（空-所有,0-待寄存,1-已寄存,2-待领取,3-已领取,4-已过期,5-已充公,9-已拒绝,99-将过期）\r\npageIndex:当前页数\r\npageSize:每页数量`,
                            requestContent:
                                '{"functionName":"getWineStoreTakeList","contentData":{"keyWord":"","state":""}}',
                        },
                        {
                            index: "GetWineStoreTakeDetail",
                            indexText: "获取存取酒详细信息(存取管理)",
                            requestRemark: `itemCode:唯一编码 \r\nisTake:是否获取已领取数据\r\nsource:来源 1：全部订单 2：已领取状态下`,
                            requestContent:
                                '{"functionName":"getWineStoreTakeDetail","contentData":{"itemCode":"0004202405150002","isTake":"0"}}',
                        },
                        {
                            index: "OpWineStore",
                            indexText: "操作存取酒功能(存取管理) ",
                            requestRemark: `itemCode: 存酒编号\r\nopType:操作类型(1:状态 2:延长天数)\r\nstate:状态类型\r\ndelayDay:延期天数\r\nuserName:操作员\r\n状态码：待寄存 = 0,已寄存 = 1,待领取 = 2,已领取 = 3,已过期 = 4,已充公回收 = 5,已拒绝 = 9`,
                            requestContent:
                                '{"functionName":"opWineStore","contentData":{"itemCode":"","opType":"1","state":"1"}}',
                        },
                        {
                            index: "BatchOpWineStore",
                            indexText: "批量操作存取酒功能(存取管理) ",
                            requestRemark: `opType:操作类型 1:全部充公 2：全部延期\r\ndelayDay:延期天数`,
                            requestContent:
                                '{"functionName":"batchOpWineStore","contentData":{}}',
                        },

                        {
                            index: "OpRevokeRecovery",
                            indexText: "撤销充公回收(存取管理) ",
                            requestRemark: `itemCode:存酒编号`,
                            requestContent:
                                '{"functionName":"opRevokeRecovery","contentData":{"itemCode":"0004202405160012"}}',
                        },
                        {
                            index: "PrintWineStoreReceipt",
                            indexText: "补打寄存小票(存取管理) ",
                            requestRemark: `itemCode:存酒编号`,
                            requestContent:
                                '{"functionName":"printWineStoreReceipt","contentData":{"itemCode":"0004202405160012"}}',
                        },
                        {
                            index: "GetWineStoreDetail",
                            indexText: "根据存取单号获取存酒信息 ",
                            requestRemark: `itemCode:存取单号`,
                            requestContent:
                                '{"functionName":"GetWineStoreDetail","contentData":{"itemCode":"0004202405160012"}}',
                        },
                        {
                            index: "GetWineStoreStat",
                            indexText: "寄存统计(寄存统计)",
                            requestRemark: `keyWord:关键词\r\nbeginTime:开始时间\r\nendTime:结束时间\r\npageIndex:当前页数\r\npageSize:每页数量`,
                            requestContent:
                                '{"functionName":"getWineStoreStat","contentData":{"keyWord":"","beginTime":"2024-03-02 00:00:00","endTime":"2024-03-02 23:59:59"}}',
                        },
                    ]
                },
                {
                    label: '排队接口',
                    options: [
                        {
                            index: "getQueueSet",
                            indexText: "排队设置(排队叫号)",
                            requestRemark: `门店取登录的门店编码
                            minCount-maxCount:人数范围,symbol:前缀A,B,C,D,E...`,
                            requestContent:
                                '{"functionName":"getQueueSet","contentData":{}}',
                        },
                        // {
                        //     index: "getQueueList",
                        //     indexText: "排队查询(排队叫号)",
                        //     requestRemark: `门店取登录的门店编码,state:0作废1排队2过号3入座
                        //     code:排队编码,callNo:呼叫号码,sortCode:排序,callNum:呼叫次数,name:排队客人姓名,mobile:排队电话,peopleNum:人数,state:状态,QueneTime:排队时间`,
                        //     requestContent:
                        //         '{"functionName":"getQueueList","contentData":{}}',
                        // },
                        // {
                        //     index: "getQueueListNew",
                        //     indexText: "排队列表(新)",
                        //     requestRemark: `tabCode:请求标签码(全部:ALL,A,B,C,D)\r\npageIndex:当前页数\r\npageSize:每页数量`,
                        //     requestContent:
                        //         '{"functionName":"getQueueListNew","contentData":{"pageIndex":1,"pageSize":10}}',
                        // },
                        {
                            index: "GetQueueTypeList",
                            indexText: "排队类型列表",
                            requestRemark: ``,
                            requestContent:
                                '{"functionName":"GetQueueTypeList","orgCode":"0015","contentData":{}}',
                        },
                        {
                            index: "GetQueueList",
                            indexText: "排队列表",
                            requestRemark: `symbolCode:A \r\npageIndex:当前页数\r\npageSize:每页数量`,
                            requestContent:
                                '{"functionName":"GetQueueList","orgCode":"0015","contentData":{"symbolCode":"A","pageIndex":1,"pageSize":10}}',
                        },
                        {
                            index: "queueTop",
                            indexText: "排队置顶",
                            requestRemark: `code:当前请求唯一键`,
                            requestContent:
                                '{"functionName":"queueTop","orgCode":"0015","contentData":{"code":""}}',
                        },
                        {
                            index: "queueCancel",
                            indexText: "排队取消",
                            requestRemark: `code:当前请求唯一键`,
                            requestContent:
                                '{"functionName":"queueCancel","orgCode":"0015","contentData":{"code":""}}',
                        },
                        {
                            index: "queueMove",
                            indexText: "排队上移",
                            requestRemark: `code:当前请求唯一键`,
                            requestContent:
                                '{"functionName":"queueMove","contentData":{}}',
                        },
                        {
                            index: "queuePrintReceipts",
                            indexText: "排队打印小票",
                            requestRemark: `code:当前请求唯一键`,
                            requestContent:
                                '{"functionName":"queuePrintReceipts","orgCode":"0015","contentData":{"code":"","version":"release"}}',
                        },
                        {
                            index: "queueRecord",
                            indexText: "排队记录",
                            requestRemark: `state:状态(空:全部,2:过号,3:已入座)\r\npageIndex:当前页数\r\npageSize:每页数量\r\nbeginTime:开始时间\r\nendTime:结束时间`,
                            requestContent:
                                '{"functionName":"queueRecord","contentData":{"state":3}}',
                        },
                        {
                            index: "getQueueBlockList",
                            indexText: "排队黑名单列表",
                            requestRemark: `pageIndex:当前页数\r\npageSize:每页数量`,
                            requestContent:
                                '{"functionName":"queueBlockList","contentData":{}}',
                        },
                        {
                            index: "queueClear",
                            indexText: "排号清零",
                            requestRemark: ``,
                            requestContent:
                                '{"functionName":"queueClear","contentData":{}}',
                        },
                        {
                            index: "queueEnabled",
                            indexText: "排号重新启用",
                            requestRemark: `code:当前请求唯一键`,
                            requestContent:
                                '{"functionName":"queueEnabled","contentData":{}}',
                        },
                        {
                            index: "queueQRcode",
                            indexText: "二维码扫码排队(排队叫号)",
                            requestRemark: `门店取登录的门店编码
                            memberName:客户名称,memberMobile:客户电话,sexCode:{"code":"011001","name":"男"},{"code":"011002","name":"女"},peopleNum:预定人数,remark:备注,ip:ip,version:小程序版本`,
                            requestContent:
                                '{"functionName":"queueQRcode","contentData":{"memberName":"张三","memberMobile":"13123454321","sexCode":"011002","peopleNum":"5","remark":"","ip","","version","release"}}',
                        },
                        {
                            index: "queueBlock",
                            indexText: "拉黑(排队叫号)",
                            requestRemark: `门店取登录的门店编码;mobile客户电话,remark备注,state状态=1拉入黑名单=0恢复正常
                                {"functionName":"queueBlock","contentData":{"mobile":"13123456789","remark":"恶意订台","state":"1"}}
                                {"functionName":"queueBlock","contentData":{"mobile":"13123456789","remark":"误会解除，恢复正常","state":"0"}}`,
                            requestContent:
                                '{"functionName":"queueBlock","contentData":{"mobile":"13123456789","remark":"恶意订台","state":"1"}}',
                        },
                        {
                            index: "queueCall",
                            indexText: "呼叫(排队叫号)",
                            requestRemark: `门店取登录的门店编码,呼叫号码:0004202401240001或0004202401240002或0004202401240003`,
                            requestContent:
                                '{"functionName":"queueCall","contentData":"0004202401240001"}',
                        },
                        {
                            index: "queueState",
                            indexText: "作废/启用(排队叫号)",
                            requestRemark: `门店取登录的门店编码,code:呼叫号码,remark:备注,state:0作废1排队2过号3入座`,
                            requestContent:
                                '{"functionName":"queueState","contentData":{"code":"0004202401240001","remark":"","state":"2"}}',
                        },
                        {
                            index: "queueSort",
                            indexText: "上下移(排队叫号)",
                            requestRemark: `门店取登录的门店编码,{"functionName":"queueSort","contentData":"0004202401240003,0004202401240004,0004202401240001,0004202401240002"}`,
                            requestContent:
                                '{"functionName":"queueSort","contentData":"0004202401240003,0004202401240004,0004202401240001,0004202401240002"}',
                        },
                        {
                            index: "queueSeat",
                            indexText: "入座(排队叫号)",
                            requestRemark: `门店取登录的门店编码,code:呼叫号码,roomCode:房台编码,remark:备注`,
                            requestContent:
                                '{"functionName":"queueSeat","contentData":{"code":"0004202401240003","roomCode":"0004002","remark":""}}',
                        },
                    ]
                },
                {
                    label: '支付接口',
                    options: [
                        {
                            index: "WeChatPay",
                            indexText: "微信商家扫码支付",
                            requestRemark: `payCode:付款码\r\npayMoney:支付金额\r\nroomCode:房间码\r\nconsumeCode:消费码\r\norderBatchCode:订单批次\r\npayBatchCode:买单批次\r\npayMoney:支付金额\r\nopUser:操作员名称`,
                            requestContent:
                                '{"functionName":"weChatPay","contentData":{"payCode":"","payMoney":0.01,"roomCode":"0004003","consumeCode":"0004202402290003","orderBatchCode":"0004202402260010161815","payBatchCode":"0004202402260010105714","payMoney":0.01,"opUser":"admin"}}',
                        },
                        {
                            index: "WeChatOrderQuery",
                            indexText: "微信商家扫码订单查询",
                            requestRemark: `out_trade_no:商家交易码`,
                            requestContent:
                                '{"functionName":"weChatOrderQuery","contentData":{"out_trade_no":""}}',
                        },
                        {
                            index: "WeChatOrderRefund",
                            indexText: "微信商家扫码订单退款",
                            requestRemark: `out_trade_no:商家交易码\r\nrefund_fee:退款金额\r\nrefund_desc:退款原因\r\nopUser:操作员名称`,
                            requestContent:
                                '{"functionName":"weChatOrderRefund","contentData":{"out_trade_no":"","refund_fee":0.01,"refund_desc":"不好吃","opUser":"admin"}}',
                        },

                        {
                            index: "WeChatNativePay",
                            indexText: "微信用户扫码支付(Native)",
                            requestRemark: `type:1 买单 2 会员卡升级,payMoney:支付金额\r\nroomCode:房间码\r\nconsumeCode:消费码\r\norderBatchCode:订单批次\r\npayBatchCode:买单批次\r\npayMoney:支付金额\r\nopUser:操作员名称`,
                            requestContent:
                                '{"functionName":"weChatNativePay","contentData":{"type":"1","payMoney":0.01,"roomCode":"0004003","consumeCode":"0004202402290003","orderBatchCode":"0004202402260010161815","payBatchCode":"0004202402260010105714","payMoney":0.01,"opUser":"admin"}}',
                        },
                        {
                            index: "WeChatNativeQuery",
                            indexText: "微信用户扫码查询(Native)",
                            requestRemark: `out_trade_no:商家交易码`,
                            requestContent:
                                '{"functionName":"weChatNativeQuery","contentData":{"out_trade_no":""}}',
                        },
                        {
                            index: "WeChatNativeRefund",
                            indexText: "微信用户扫码退款(Native)",
                            requestRemark: `out_trade_no:商家交易码\r\nrefund_fee:退款金额\r\nrefund_desc:退款原因\r\nopUser:操作员名称`,
                            requestContent:
                                '{"functionName":"weChatNativeRefund","contentData":{"out_trade_no":"","refund_fee":0.01,"refund_desc":"不好吃","opUser":"admin"}}',
                        },
                        {
                            index: "WeChatNativeClose",
                            indexText: "微信用户扫码关闭(Native)",
                            requestRemark: `out_trade_no:商家交易码`,
                            requestContent:
                                '{"functionName":"weChatNativeClose","contentData":{"out_trade_no":""}}',
                        },
                        {
                            index: "AliPay",
                            indexText: "支付宝支付",
                            requestRemark: `payCode:付款码\r\npayMoney:支付金额\r\nroomCode:房间码\r\nconsumeCode:消费码\r\norderBatchCode:订单批次\r\npayBatchCode:买单批次\r\npayMoney:支付金额\r\nopUser:操作员名称\r\nsubject:商品或者订单名称`,
                            requestContent:
                                '{"functionName":"AliPay","contentData":{"payCode":"","payMoney":"100.00","roomCode":"","consumeCode":"0004202401310012","orderBatchCode":"123","payBatchCode":"123","opUser":"123","subject":"商品名称"}}',
                        },
                        {
                            index: "AliPayReturn",
                            indexText: "支付宝退款",
                            requestRemark: `out_trade_no:支付宝交易单号,refund_amount:退款金额`,
                            requestContent:
                                '{"functionName":"AliPayReturn","contentData":{"out_trade_no":"","refund_amount":"1"}}',
                        },
                        {
                            index: "AliPaySearch",
                            indexText: "支付宝交易查询",
                            requestRemark: `out_trade_no:支付宝交易单号`,
                            requestContent:
                                '{"functionName":"AliPaySearch","contentData":{"out_trade_no":""}}',
                        },
                        {
                            index: "AliPayCancel",
                            indexText: "支付宝交易撤销",
                            requestRemark: `out_trade_no:支付宝交易单号`,
                            requestContent:
                                '{"functionName":"AliPayCancel","contentData":{"out_trade_no":""}}',
                        },
                        {
                            index: "AliPayPrecreate",
                            indexText: "支付宝生成支付二维码",
                            requestRemark: `type:1 买单 2会员卡升级,payMoney:支付金额\r\nroomCode:房间码\r\nconsumeCode:消费码\r\norderBatchCode:订单批次\r\npayBatchCode:买单批次\r\npayMoney:支付金额\r\nopUser:操作员名称\r\nsubject:商品或者订单名称`,
                            requestContent:
                                '{"functionName":"AliPayPrecreate","contentData":{"type":"1","payMoney":"0.01","roomCode":"123","consumeCode":"0004202401310012","orderBatchCode":"123","payBatchCode":"123","opUser":"123","subject":"商品名称"}}',
                        },
                    ]
                },
                {
                    label: '统计接口',
                    options: [
                        {
                            index: "GetReserveStateCount",
                            indexText: "获取预定各状态数量统计",
                            requestRemark: `currentDate_Start:开始时间,currentDate_End:结束时间
                            totalCount:总数量,reserveCount:预定数量,finishCount:完成数量,cancelCount:取消数量`,
                            requestContent:
                                '{"functionName":"GetReserveStateCount","contentData":{"currentDate_Start":"2024-03-01 00:00:00","currentDate_End":"2024-03-11 23:00:00"}}',
                        },
                        {
                            index: "SatSaleRanking",
                            indexText: "销售排行统计",
                            requestRemark: `门店取登录的门店编码,startDate:开始时间,endDate:结束时间 (两个时间都为空,则统计当前时间前6个月数据,某个时间为空,两个时间不能有一个为空,要么都空,要么都有值)`,
                            requestContent:
                                '{"functionName":"SatSaleRanking","contentData":{"startDate":"","endDate":""}}',
                        },
                        {
                            index: "GetSaleRanking",
                            indexText: "销售排行",
                            requestRemark: `门店取登录的门店编码,startDate:开始时间,endDate:结束时间 (两个时间都不能为空),type:2(查询 单品+套餐) 其他值 查询 单品/套餐数据`,
                            requestContent:
                                '{"functionName":"GetSaleRanking","contentData":{"startDate":"2023-01-01 00:00:00","endDate":"2025-01-01 00:00:00","type":""}}',
                        },
                        {
                            index: "GetCashierSummary",
                            indexText: "收银台汇总",
                            requestRemark: `keyWord:房间号/收银员\r\nstate:状态(1:未支付，2：已支付)\r\nbeginTime:开始时间\r\n endTime:结束时间\r\npageIndex:当前页数\r\npageSize:每页数量`,
                            requestContent:
                                '{"functionName":"getCashierSummary","contentData":{"keyWord":"","state":"","beginTime":"2024-03-01 00:00:00","endTime":"2024-03-12 23:59:59"}}',
                        },
                        {
                            index: "GetCashierDetail",
                            indexText: "收银台详细信息",
                            requestRemark: `consumeCode:消费单号`,
                            requestContent:
                                '{"functionName":"getCashierDetail","contentData":{"consumeCode":"0004202403120006"}}',
                        },
                        {
                            index: "GetAbnormalConsume",
                            indexText: "异常消费",
                            requestRemark: `门店取登录的门店编码,startDate:开始时间,endDate:结束时间 (两个时间都不能为空)
                            {abnormalCount:异常总数,abnormalAmt:异常消费金额,AbnormalConsume:[{consumeCode:消费编号,memberCode:会员卡号,memberName:会员名称,memberMobile:手机号,consumeDate:消费时间,staDate:归属营销时间,payAmt:消费金额,roomCode:房台号,roomName:房台名称}]}`,
                            requestContent:
                                '{"functionName":"GetAbnormalConsume","contentData":{"startDate":"2022-01-01 00:00:00","endDate":"2023-01-01 00:00:00","pageSize":15,"pageIndex":1}}',
                        },
                        {
                            index: "GetMarketGroup",
                            indexText: "营销分组",
                            requestRemark: `门店取登录的门店编码,code 编号 name 名称`,
                            requestContent:
                                '{"functionName":"GetMarketGroup","contentData":""}',
                        },
                        {
                            index: "GetMarketRank",
                            indexText: "获取营销职级",
                            requestRemark: `门店取登录的门店编码,code 编号 name 名称`,
                            requestContent:
                                '{"functionName":"GetMarketRank","contentData":""}',
                        },
                        {
                            index: "GetMarketRankUser",
                            indexText: "获取当前的营销人员",
                            requestRemark: `门店取登录的门店编码,code 编号 name 名称`,
                            requestContent:
                                '{"functionName":"GetMarketRankUser","contentData":{"rankCode":"职级编号","groupCode":"分组编号"}}',
                        },
                    ]
                },
                {
                    label: '打印接口',
                    options: [
                        {
                            index: "PrintTask",
                            indexText: "打印测试",
                            requestRemark: ``,
                            requestContent:
                                '{"functionName":"printTask","contentData":{}}',
                        },
                        {
                            index: "OrderPayPrint",
                            indexText: "收银小票打印(补打)",
                            requestRemark: `payBatchCode:买单批次号`,
                            requestContent:
                                '{"functionName":"OrderPayPrint","contentData":{"payBatchCode":"0004202402050005100647"}}',
                        },
                        {
                            index: "OrderAddPrint",
                            indexText: "台单(点单)小票打印(补打)",
                            requestRemark: `orderBatchCode:点单批次号`,
                            requestContent:
                                '{"functionName":"OrderAddPrint","contentData":{"orderBatchCode":"0004202402050005200908"}}',
                        },
                        {
							index: "OrderSummaryReceiptPrint",
							indexText: "出品汇总小票打印*",
							requestRemark: `门店取登录的门店编码,consumeCode:消费单号,roomCode:房台编码,payUser:付款人(代付),cashUser:收银员,payBatchCode:批次号(首次买单为空,后续再买单将首次的批次号传入),detailList:付款商品列表(使用点单的itemCode),orderAmt:点单商品金额,realPayAmt:实际收款金额,payList:支付列表(手机端只有一条,电脑端可能有多条),totalAmt:本次需要的付款金额,payAmt:客人付款金额(现金可能大于点单金额,需要有找零和抹零,其他方式totalAmt==payAmt),giveChange:找零金额,smallChange:抹零金额,memberCode:会员编码(会员付款),memberName:会员姓名,memberMobile:电话,memberOpenId:openid,payType:支付方式(001现金002微信003支付宝004会员卡005消费卷)`,
							requestContent:
								'{"functionName":"OrderSummaryReceiptPrint","contentData":{"producePointCode":"000402","producePointName":"000402","StartDate":"2024-01-01 00:00:00","EndDate":"2024-05-01 00:00:00"}}',
						},
                        {
							index: "WineTakeTotalPrint",
							indexText: "取酒汇总小票打印*",
							requestRemark: `门店取登录的门店编码,consumeCode:消费单号,roomCode:房台编码,payUser:付款人(代付),cashUser:收银员,payBatchCode:批次号(首次买单为空,后续再买单将首次的批次号传入),detailList:付款商品列表(使用点单的itemCode),orderAmt:点单商品金额,realPayAmt:实际收款金额,payList:支付列表(手机端只有一条,电脑端可能有多条),totalAmt:本次需要的付款金额,payAmt:客人付款金额(现金可能大于点单金额,需要有找零和抹零,其他方式totalAmt==payAmt),giveChange:找零金额,smallChange:抹零金额,memberCode:会员编码(会员付款),memberName:会员姓名,memberMobile:电话,memberOpenId:openid,payType:支付方式(001现金002微信003支付宝004会员卡005消费卷)`,
							requestContent:
								'{"functionName":"WineTakeTotalPrint","contentData":{"StartDate":"2024-01-01 00:00:00","EndDate":"2024-05-01 00:00:00"}}',
						},
                        {
							index: "WineStoreTotalPrint",
							indexText: "存酒汇总小票打印*",
							requestRemark: `门店取登录的门店编码,consumeCode:消费单号,roomCode:房台编码,payUser:付款人(代付),cashUser:收银员,payBatchCode:批次号(首次买单为空,后续再买单将首次的批次号传入),detailList:付款商品列表(使用点单的itemCode),orderAmt:点单商品金额,realPayAmt:实际收款金额,payList:支付列表(手机端只有一条,电脑端可能有多条),totalAmt:本次需要的付款金额,payAmt:客人付款金额(现金可能大于点单金额,需要有找零和抹零,其他方式totalAmt==payAmt),giveChange:找零金额,smallChange:抹零金额,memberCode:会员编码(会员付款),memberName:会员姓名,memberMobile:电话,memberOpenId:openid,payType:支付方式(001现金002微信003支付宝004会员卡005消费卷)`,
							requestContent:
								'{"functionName":"WineStoreTotalPrint","contentData":{"StartDate":"2024-01-01 00:00:00","EndDate":"2024-05-01 00:00:00"}}',
						},
                        {
							index: "DailySettlePrint",
							indexText: "日结小票打印*",
							requestRemark: `门店取登录的门店编码`,
							requestContent:
								'{"functionName":"DailySettlePrint","contentData":{}}',
						},
                        {
							index: "HandoverPrint",
							indexText: "交班小票打印*",
							requestRemark: `门店取登录的门店编码`,
							requestContent:
								'{"functionName":"HandoverPrint","contentData":{"handoverStartDate":"2024-01-01 00:00:00","handoverEndDate":"2024-05-16 00:00:00"}}',
						},
						{
							index: "AddPrinter",
							indexText: "添加打印机*",
							requestRemark: `添加打印机配置编码,printName:打印机名,ipAddress:打印机IP地址,sparePrintName：备用打印机名,spareIpAddress:备用打印机IP地址`,
							requestContent:
								'{"functionName":"AddPrinter","contentData":{"name":"测试打印机","ipAddress":"192.168.0.19","sparePrintName":"测试备用打印机","spareIpAddress":"192.168.0.28"}}',
						},
                        {
							index: "GetPrints",
							indexText: "获取打印机列表*",
							requestRemark: `打印机列表配置编码`,
							requestContent:
								'{"functionName":"GetPrints","contentData":{}}',
						},
                        {
							index: "TestPrint",
							indexText: "打印测试*",
							requestRemark: `配置编码,code:打印机编码`,
							requestContent:
								'{"functionName":"TestPrint","contentData":{"code":"000409"}}',
						},
                        {
							index: "EditPrinter",
							indexText: "编辑打印机*",
							requestRemark: `编辑打印机配置编码,printCode:打印机编码,printName:打印机名,ipAddress:打印机IP地址,sparePrintName：备用打印机名,spareIpAddress:备用打印机IP地址`,
							requestContent:
								'{"functionName":"EditPrinter","contentData":{"printCode":"000409","name":"测试打印机1","ipAddress":"192.168.1.19","sparePrintName":"测试备用打印机1","spareIpAddress":"192.168.1.28"}}',
						},
                        {
							index: "DelPrinter",
							indexText: "删除打印机*",
							requestRemark: `添加打印机配置编码,printCode:打印机编码`,
							requestContent:
								'{"functionName":"DelPrinter","contentData":{"printCode":"000409"}}',
						},
                        {
							index: "GetPrintEnumType",
							indexText: "获取打印枚举类型*",
							requestRemark: `打印模板配置编码,printTemplateType:打印模板编码（0：点单收银,1：扫码收银,2：扫码台单,3：出品,4：出品总单,5：存取酒,6：存酒标签,7：转台分单）`,
							requestContent:
								'{"functionName":"GetPrintEnumType","contentData":{"printTemplateType":"0"}}',
						},
						{
							index: "GetPrintTemplate",
							indexText: "获取打印模板信息*",
							requestRemark: `打印模板配置编码,PrintCode:打印机编号,Type:打印模板编码（0：点单收银,1：扫码收银,2：扫码台单,3：出品,4：出品总单,5：存取酒,6：存酒标签,7：转台分单）`,
							requestContent:
								'{"functionName":"GetPrintTemplate","contentData":{"printCode":"000402","type":"0"}}',
						},
                        {
							index: "GetAllPrintTemplate",
							indexText: "获取全部打印模板信息*",
							requestRemark: `打印模板配置编码,PrintCode:打印机编号,Type:打印模板编码（0：点单收银,1：扫码收银,2：扫码台单,3：出品,4：出品总单,5：存取酒,6：存酒标签,7：转台分单）`,
							requestContent:
								'{"functionName":"GetAllPrintTemplate","contentData":{"printCode":"000402"}}',
						},
                        {
							index: "ClearPrintTemplate",
							indexText: "清空打印模板信息*",
							requestRemark: `打印模板配置编码,PrintCode:打印机编号,Type:打印模板编码（0：点单收银,1：扫码收银,2：扫码台单,3：出品,4：出品总单,5：存取酒,6：存酒标签,7：转台分单）`,
							requestContent:
								'{"functionName":"ClearPrintTemplate","contentData":{"printCode":"000402","type":"0"}}',
						},
                        {
							index: "PrintTemplateConfig",
							indexText: "打印模板配置*",
							requestRemark: `打印模板配置编码,PrintCode:打印机编号,Type:打印模板编码（0：点单收银,1：扫码收银,2：扫码台单,3：出品,4：出品总单,5：存取酒,6：存酒标签,7：转台分单）,ipAddress:IP地址,roomCodes:桌台号,producePoints:出品点，printTypes：小票类型，isPrint：是否打印`,
							requestContent:
								'{"functionName":"PrintTemplateConfig","contentData":{"printCode":"000402","type":"0","ipAddress":["23","22222"],"printTypes":[{"printType":0,"printNum":1}]}}',
						},
                        {
							index: "GetPrintTasks",
							indexText: "获取打印记录列表*",
							requestRemark: `打印模板配置编码,pageIndex:页码,pageSize:条数,code:编号,typeCode:打印类型,roomCode:桌号,printName:打印机,state:打印状态(0打印失败1待打印2已下拉3已打印)`,
							requestContent:
								'{"functionName":"GetPrintTasks","contentData":{"pageIndex":"1","pageSize":"20"}}',
						},
                        {
							index: "SetPrinterTaskState",
							indexText: "补打小票*",
							requestRemark: `补打小票,code:编码`,
							requestContent:
								'{"functionName":"SetPrinterTaskState","contentData":{"code":"0004202403280014"}}',
						},
                    ]
                },
                {
                    label: '打印接口',
                    options: [
                    {
                            index: "GetGiftRecordList",
                            indexText: "获取赠送菜品记录",
                            requestRemark: `beginTime:开始时间 \r\n endTime:结束时间 \r\n consumeCode:消费单号 \r\n roomCode:桌台号 \r\n giftUser:赠送人 \r\n pageSize:页数 \r\n pageIndex:页码`,
                            requestContent: '{"functionName":"GetGiftRecordList","contentData":{"consumeCode":""}}',
                            responseContent: {
                                consumeCode: "消费单号",
                                roomCode: "房台编码",
                                roomName: "房台名称",
                                goodsCode: "商品编码",
                                goodsName: "商品名称",
                                uomCode: "单位编码",
                                uomName: "单位名称",
                                salePrice: "单价",
                                orderQty: "数量",
                                realAmt: "赠送金额",
                                giveType: "赠送类型",
                                giftUser: "赠送人",
                                giftTime: "赠送时间",
                                giftRemark: "增送备注",
                                state: "状态",
                                subGoods: "套餐子商品",
                            }
                        },
                        {
                            index: "GetReturnChangeGoodsRecord",
                            indexText: "获取退换菜记录",
                            requestRemark: `beginTime:开始时间 \r\n endTime:结束时间 \r\n consumeCode:消费单号 \r\n roomCode:桌台号 \r\n opUser:操作人 \r\n  \r\n pageSize:页数 \r\n pageIndex:页码`,
                            requestContent: '{"functionName":"GetReturnChangeGoodsRecord","contentData":{}}',
                            responseContent: {
                                consumeCode: "消费单号",
                                roomCode: "房台编码",
                                roomName: "房台名称",
                                goodsCode: "商品编码",
                                goodsName: "商品名称",
                                uomCode: "单位编码",
                                uomName: "单位名称",
                                salePrice: "单价",
                                orderQty: "数量",
                                realAmt: "金额",
                                orderUser: "点单员",
                                orderTime: "下单时间",
                                sourceType: "下单来源(0:服务员端 1：小程序端 2:PC端)",
                                opUser: "操作员",
                                opDate: "操作时间",
                                flavor: "口味",
                                isPackage: "是否套餐",
                                state: "状态",
                                subGoods: "套餐子商品",
                            }
                        },
                    ]
                }
                // {
                // 	index: "GetPayUser",
                // 	indexText: "获取预定各状态数量统计",
                // 	requestRemark: `code:编号,name:名字`,
                // 	requestContent:
                // 		'{"functionName":"GetPayUser","contentData":""}',
                // },

            ],
        };
    },
    methods: {
        optionChange() {
            this.optionsInfo.find((item) => {
                let obj = item.options.find((x) => x.index == this.requestIndex);
                if (obj) {
                    this.requestRemark = obj.requestRemark;
                    this.requestContent = obj.requestContent;
                    this.requestResult = "";
                }
            }
            );
            // let option = this.optionsInfo.find(
            //     (item) => item.index == this.requestIndex
            // );
            // this.requestRemark = option.requestRemark;
            // this.requestContent = option.requestContent;
            // this.requestResult = "";
        },
        radioChange(e) {
            this.optionsInfo.find((item) => {
                let obj = item.options.find((x) => x.index == this.requestIndex);
                if (obj) {
                    this.requestRemark = obj.requestRemark;
                    this.requestContent = obj.requestContent;
                    this.requestResult = "";
                }
            }
            );
        },
        copyToken() {
            this.requestContent = this.token;
        },
        async submit() {
            if (this.requestIndex == "appLogin") {
                let url = `${config.API_URL}/AppLogin`;
                let data = JSON.parse(this.requestContent);
                let result = await http.get(url, data);
                if (result.opFlag == "1") {
                    this.token = this.requestResult = result.userInfo.token;
                    this.hasToken = true;
                    this.requestResult = "登录成功,token:" + this.token;
                } else {
                    this.requestResult = result.opMsg;
                    this.hasToken = false;
                }
            } else if (this.requestIndex == "appGetStore") {
                let url = `${config.API_URL}/AppGetStore`;
                let data = JSON.parse(this.requestContent);
                let result = await http.get(url, data);
                if (result.opFlag == "1") {
                    this.requestResult = "拉取门店:" + result.data;
                } else {
                    this.requestResult = result.opMsg;
                }
            } else {
                if (!this.hasToken) {
                    this.requestResult = "请登录";
                } else {
                    let url = `${config.API_URL}/AppObjProcess`;
                    let data = JSON.parse(this.requestContent);
                    let result = await http.post(url, data, {
                        headers: {
                            token: "Bearer " + this.token,
                        },
                    });
                    if (result.opFlag == "1") {
                        // eslint-disable-next-line no-debugger
                        //debugger;
                        try {
                            this.requestResult = JSON.stringify(
                                JSON.parse(
                                    JSON.stringify(result.content)
                                        .replaceAll('\\"', '"')
                                        .replaceAll('"[', "[")
                                        .replaceAll(']"', "]")
                                )
                            );
							this.responseResult = JSON.parse(this.requestResult)
                        } catch (error) {
                            this.requestResult = result.content.objectList[0].rowData;
                            this.responseResult = JSON.parse(result.content.objectList[0].rowData)
                        }
                    } else {
                        this.requestResult = result.opMsg;
                    }
                }
            }
        },
		format() {

			let result = JSON.parse(this.requestContent)
			this.requestContent = JSON.stringify(result, null, 4)
		}
    },
    async mounted() {
        this.optionChange();
        this.submit();
    },
};
</script>
